package com.example.gerenciadoralunofatec_pg;


import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;
import android.app.Activity;
import android.content.Intent;
public class NovaTarefa extends Activity {
	public EditText nomeTarefa;
	public EditText nomeMateria;
	public EditText data;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_nova_tarefa);
		nomeTarefa = (EditText)findViewById(R.id.editTexttarefa);
		nomeMateria = (EditText)findViewById(R.id.editTextmateria);
		data = (EditText)findViewById(R.id.editTextdata);
			}
	
public void adicionaTarefa(View view){
	Intent addNota = new Intent(this, Tarefas.class);
	String Tarefa  = nomeTarefa.getText().toString();
	String Materia  = nomeMateria.getText().toString();
	String DtTarefa  = data.getText().toString();
	addNota.putExtra("NOMETAREFA", Tarefa); //Enviar
	addNota.putExtra("NOMEMATERIA", Materia); //Enviar
	addNota.putExtra("DATA", DtTarefa); //Enviar
	startActivity(addNota);
	}
	
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.nova_tarefa, menu);
		return true;
	}

}
